#include "sprite.hpp"

unsigned int Sprite::lastId = 0;

Sprite::Sprite(SpriteDefinition* spriteDefinition)
{
    texturePath = spriteDefinition->GetTexturePath();
    show = true;
    id = lastId++;
    std::cout << "Creation du Sprite " << id
        << " (" << spriteDefinition->GetName() << ")" << std::endl;
}

Sprite::~Sprite()
{
}

void Sprite::Update()
{
    this->clip = this->animationManager.GetNextAnimation();
}

void Sprite::Show()
{
    show = true;
}

void Sprite::Hide()
{
    show = false;
}
